package com.relife.core.easyui;

public class Tree {
	private String id;
	private String text;
	private String iconCls;
	private String state = "closed";
	private String children;
	private boolean open = false;

	public Tree() {
	}

	public Tree(String id, String text) {
		this.id = id;
		this.text = text;
	}

	public Tree(String id, String text, String children) {
		this.id = id;
		this.text = text;
		this.children = children;
	}

	public Tree(String id, String text, boolean open, String children) {
		this.id = id;
		this.text = text;
		this.children = children;
		this.state = open ? "open" : "closed";
	}

	public Tree(String id, String text, String iconCls, boolean open, String children) {
		this.id = id;
		this.text = text;
		this.iconCls = iconCls;
		this.state = open ? "open" : "closed";
		this.children = children;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public String getState() {
		return state;
	}

	public String getChildren() {
		return children;
	}

	public void setChildren(String children) {
		this.children = children;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

}
